package ch.sv7.tool.dbmanager.db.difference;

import ch.sv7.tool.dbmanager.db.ColumnSchema;

/**
 * Express a column with a too small size
 *
 * @author svt
 *
 */
public class ColumnSizeTooSmallDifference extends AbstractColumnDifference {

	private String param;
	
	private long expectedSize;

	private long actualSize;

	public ColumnSizeTooSmallDifference(ColumnSchema expectedColumnSchema, ColumnSchema actualColumnSchema, String param, long expectedSize,
			long actualSize) {
		super(expectedColumnSchema, actualColumnSchema);
		this.param = param;
		this.expectedSize = expectedSize;
		this.actualSize = actualSize;
	}

	public String getMessage() {
		return super.getMessage() + " has too small " + param + ", Expected : " + expectedSize + " Actual : " + actualSize;
	}

	/**
	 * @return the expectedParam
	 */
	public long getExpectedSize() {
		return expectedSize;
	}

	/**
	 * @return the actualParam
	 */
	public long getActualSize() {
		return actualSize;
	}

	/**
	 * @return the param
	 */
	public String getParam() {
		return param;
	}
	
	public boolean isBlocker() {
		return true;
	}
}